@extends('home.enterprises.layout')
@section('content')
<div class="modifypostion">
	<ul>
		<li class="new_biao"><span>＊</span>号为必填项</li>
	</ul>
	<div class="clear"></div>
</div>
<div class="ip_company new_position" style = 'overflow:hidden'>
	<form method="post" action="{{ url('/home/enterprise/jobs/jobschang') }}" id="editCompanyInfo_forms" name="editCompanyInfo_form">
		{{ csrf_field() }}
		<input type="hidden" name='eid' value='{{ $id }}'>
		<input type="hidden" name='rid' value='{{ $rData -> id }}'>
		<!--信息填写 开始-->
		<table width="100%" cellspacing="0" cellpadding="0">
			<tbody><tr>
				<th class="post_must" style='height:30px;line-height:30px;'>职位名称</th>
				<td>
					<table width="100%" cellspacing="0" cellpadding="0">
						<tbody><tr>
							<td>
							<div class="form-group">
							    <input style='width:50%;float:left;' name='workname'  onblur="if(this.value=='请输入职位名称'||this.value==''){this.placeholder='请输入职位名称';}" class="form-control input-sm" type="text" placeholder="请输入职位名称" value='{{ $rData -> workname }}'>
							 
							
								<span style="height: 30px;line-height: 30px;padding-right: 4px; padding-left: 10px;float:left;" class="nametip">可输入<em style="font-style: normal;">30</em>个汉字或<strong style="font-weight: normal;">60</strong>个字符</span>
							</div>
								</td>
							<td style="padding-right: 0;" class="margWidRight">
								<div class="companyPersin">
									<span>提示：</span>请您认真填写，职位名称发布后不可修改。
								</div></td>
						</tr>
					</tbody></table></td>
			</tr>
			<tr>
				<th class="post_must" style='height:30px;line-height:30px;'>职位类别</th>
				<td><div class="form-group">
				<input id='zler' onclick="shoi($('#popupDivJobType'),$('#popupDivSubJobType'))" style='width:30%;float:left;' readonly="readonly" maxlength="8" onblur="if(this.value=='请选择类别'||this.value==''){this.placeholder='请选择类别';}" class="form-control input-sm" type="text" placeholder="请选择类别" value="{{ $rData -> cN }}">
				</div>
					<div id="popupDivJobType" style="position: absolute; left: 302px; top: -64px; visibility: hidden; z-index: 1099;">
						<table class="popupDivCon" width="550" cellspacing="0" cellpadding="0" border="0"><tbody>
							<tr>
								<td class="popupDivCon_Title">
									职位类别：<span title="不限">不限</span>
								</td>
								<td class="popupDivCon_Title" align="right">
									<p>
										[<a class="bluelink" href="javascript:resetIn('请选择类别',$('#popupDivJobType'));">清除</a>][<a class="bluelink" href="javascript:closePopu('#popupDivJobType');">关闭</a>]&nbsp;
									</p>
								</td>
							</tr>
							<tr>
								<td colspan="2" class="popupDivCon_Content">
									<table width="100%" cellspacing="0" cellpadding="0" border="0">
										<tbody>
												<tr height="24">
											@foreach($cateData as $k => $v)
												@if($k == 0 || $k == 1)
												
													<td width="170">
														<a class="bluelink" href="#" onclick="three('{{ $v -> id }}','{{ $v -> name }}','{{ $v -> id }}');return false;">{{ $v -> name }}</a>
													</td>
													<td rowspan="99" style="border-left:#7B797B 1px dotted;" width="20">
														<img src="{{ url('/home/img/blank.gif') }}" width="1" border="0" height="1">
													</td>
													
												@elseif($k % 3 == 2)
													<td width="170">
														<a class="bluelink" href="#" onclick="three('{{ $v -> id }}','{{ $v -> name }}','{{ $v -> id }}');return false;">{{ $v -> name }}</a>
													</td>
												</tr>
												<tr height="24">
												@else
													<td width="170">
														<a class="bluelink" href="#" onclick="three('{{ $v -> id }}','{{ $v -> name }}','{{ $v -> id }}');return false;">{{ $v -> name }}</a>
													</td>
												@endif
											@endforeach
												</tr>
											
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
						</table>
					</div>
				
				</td>
			</tr>
			

			<tr>
				<th></th>
				<td>
				<div class="form-group">
				<input id='jqzw' style='width:30%;float:left;' readonly="readonly" maxlength="8" onblur="if(this.value=='请选择名称'||this.value==''){this.placeholder='请选择名称';}" class="form-control input-sm" type="text" placeholder="请选择名称" value="{{ $rData -> pN }}">
				
				<span class="thickkiy" style='float:left;height: 30px;line-height: 30px;'>精准选择职位类别可以提升招聘效果</span></div>
				<div id="popupDivSubJobType" style="position: absolute; overflow:hidden; height:500px;left: 302px; top: 234px; visibility: hidden; z-index: 1099;">
					<table class="popupDivCon" width="500" cellspacing="0" cellpadding="0" border="0">
					<tbody>
					<tr>
						<td class="popupDivCon_Title">
							职位名称：<span title="不限">不限</span>
						</td>
						<td class="popupDivCon_Title" align="right">
							<p>[<a class="bluelink" href="javascript:resetInJ('请选择职位名称',$('#popupDivSubJobType'));">清除</a>][<a class="bluelink" href="javascript:closePopu('#popupDivSubJobType')">关闭</a>]&nbsp;</p>
						</td>
					</tr>
					<tr>
						<td colspan="2" class="popupDivCon_Content">
							@foreach($cateSData as $key => $value)
							<table pid='{{ $key }}' width="100%" cellspacing="0" cellpadding="0" border="0">
							<tbody>
										
												<tr height="24">
											@foreach($value as $k => $v)
												@if($k == 0 || $k == 1)
												
													<td width="170">
														<a class="bluelink" href="#" onclick="four('{{ $v -> id }}','{{ $v -> name }}','{{ $v -> id }}');return false;">{{ $v -> name }}</a>
													</td>
													<td rowspan="99" style="border-left:#7B797B 1px dotted;" width="20">
														<img src="{{ url('/home/img/blank.gif') }}" width="1" border="0" height="1">
													</td>
													
												@elseif($k % 3 == 2)
													<td width="170">
														<a class="bluelink" href="#" onclick="four('{{ $v -> id }}','{{ $v -> name }}','{{ $v -> id }}');return false;">{{ $v -> name }}</a>
													</td>
												</tr>
												<tr height="24">
												@else
													<td width="170">
														<a class="bluelink" href="#" onclick="four('{{ $v -> id }}','{{ $v -> name }}','{{ $v -> id }}');return false;">{{ $v -> name }}</a>
													</td>
												@endif
											@endforeach
												</tr>
										
							</tbody>
							</table>
							@endforeach
						</td>
					</tr>
				</tbody>
				</table>
			</div>
				</td>
			</tr>
			<script>
				var inp = $('<input type="hidden" form="editCompanyInfo_forms" name="c_id[]">');
				var inpc = $('<input type="hidden" form="editCompanyInfo_forms" name="c_id[]">');
				// 要显示的职位分类
				var popupDiv = $('#popupDivJobType');
				// 触发职位分类的元素
				var zler = $('#zler');
				// console.log(popupDiv);
				// 精确职位
				var jqzw = $('#jqzw');
				// 上一个分类中的终极类框显示出来了
				var popupDivSubJob = $('#popupDivSubJobType');
				// 添加单击事件
				// zler.click(shoi(popupDiv));
				// 对象隐藏于显示
				function shoi()
				{
					// 获取职业类中的终极类
					if($(arguments[0]).css('visibility').indexOf('hidden') >= 0)
					{
						$(arguments[0]).css({
							visibility:'visible',
						});
						$(arguments[1]).css({
							visibility:'hidden',
						});
					}else
					{
						$(arguments[0]).css({
							visibility:'hidden',
						});
						$(arguments[1]).css({
							visibility:'hidden',
						});
					}
					jqzw.unbind('click');
					
				}
				
				//
				function three()
				{
					// console.log(arguments);
					$($('span[title]')[0]).attr('title',arguments[1]);
					$($('span[title]')[0]).html(arguments[1]);
					zler.val(arguments[1]);
					popupDiv.css({
						visibility:'hidden'
					});
					jqzw.attr('onclick',"shoi($('#popupDivSubJobType'),$('#popupDivJobType'));");
					popupDivSubJob.css('visibility',"visible");
					$('table[pid]').css('display','none');
					$('table[pid='+ parseInt(arguments[0]) +']').css('display','block');
					// 职业职位二级类
					inp.val(arguments[0]);
					$('body').find('.main_daohang').append(inp);
					// console.log($('span[title]')[0]);
				}
				function four()
				{
					// console.log(arguments);
					// console.log($('span[title]'));
					$($('span[title]')[1]).attr('title',arguments[1]);
					$($('span[title]')[1]).html(arguments[1]);
					jqzw.val(arguments[1]);
					popupDivSubJob.css({
						visibility:'hidden'
					});
					// 职业职位三级类
					inpc.val(arguments[0]);
					$('body').find('.main_daohang').append(inpc);
					// jqzw.attr('onclick',"shoi($('#popupDivSubJobType'));");
					// popupDivSubJob.css('visibility',"visible");
					// $('table[pid]').css('display','none');
					// $('table[pid='+ parseInt(arguments[0]) +']').css('display','block');
					
					// console.log($('span[title]')[0]);
				}
				function closePopu()
				{
					$(arguments[0]).css({
						visibility:'hidden',
					});
				}
				function resetIn()
				{
					zler.val(arguments[0]);
					jqzw.removeAttr('onclick');
					resetInJ('请输入职位名称');
					$(arguments[1]).css({
						visibility:'hidden',
					});
				}
				function resetInJ()
				{
					jqzw.val(arguments[0]);
					$(arguments[1]).css({
						visibility:'hidden',
					});

				}
			</script>

			<tr>
				<th valign="top" class="post_must">职位描述</th>
				<td valign="top" class="o3class">
					<table cellspacing="0" cellpadding="0">
						<tbody><tr>
							<td>
								<div>
									最多2000个字符（包含HTML标签，1个中文字占2个字符）<a name="adjobdesc"></a>&nbsp;<font class="errorStr"></font>
									<p class="sexismtip">
										强烈建议您不使用任何有性别歧视的词语。<a id="sexismWid" href="#">了解不能使用的性别歧视词语举例。</a>
									</p>
								</div> 
								<div class="form-group">
                                    <!-- 加载编辑器的容器 -->
                                    <script id="zwms" style='width:100%;height:200px;' name="detail" type="text/plain">{!! $rData -> description !!}</script>
                                    <!-- 实例化编辑器 -->
                                    <script type="text/javascript">
                                        var zwms = UE.getEditor('zwms',{
                                        	maximumWords:2000,
                                        	toolbars: [
											    ['fullscreen', 'source', 'undo', 'redo'],
											    ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall','preview', 'cleardoc']
											],
    										autoHeightEnabled: false
                                        });

                                    </script>
                                   
                                </div>
							</td>
							<td width="110" valign="top" class="tieshi">
								<div style="margin-top: 33px" class="companyPersin">
									<span>提示：</span>您的职位描述信息会出现在您的招聘广告页中，请您认真填写。<br>
									职位描述信息包括但不限于：<br> 1、岗位职责；<br> 2、任职要求。
								</div></td>
						</tr>
						<script>
							function tag_onclick(span)
							{
								var lab = $('#label').clone();
								var td = $('#label').parent();// alert(span);
								// alert($);
								if(!$(span).attr('class'))
								{
									$(span).attr('class','light-selected');
									if(9==$('span[class=light-selected]').length)
									{
										$(span).attr('class','');
										alert('最多可选择8个标签');
										return false;
									}
									// console.log($(span).attr('job_id'));
									
									// console.log(td);
									lab.removeAttr('id');
									lab.attr('name','label[]')
									lab.attr('class',$(span).attr('job_id'))
									lab.val($(span).attr('job_id'));
									td.append(lab);
								}else
								{
									$(span).attr('class','');
									$('input[name^=label][value]').remove('.' + $(span).attr('job_id'));
								}
							}
						</script>
						<tr>
							<td rowspan="2">
								<div class="add-light-box">
									<p class="light-p">
										增加职位亮点标签<i></i><span> ( 选择职位亮点，提升职位吸引力，有效增加职位投递！) </span>
									</p>
									<p class="light-text">最多可选择8个标签</p>
									<div class="welfare-tab-box">
									@foreach($label as $k => $v)
									<span 
									@if(!empty($labelData) && in_array($v -> id,$labelData))
									class="light-selected"
									@endif job_name="{{ $v -> value }}" job_id="{{ $v -> id }}" class="" onclick="tag_onclick(this)">{{ $v -> value }}<i></i></span>
									@endforeach									</div>
								</div> <input id='label' type="hidden">
								@if(!empty($labelData))
								@foreach($labelData as $k => $v)
								<input class="{{ $v }}" name="label[]" value="{{ $v }}" type="hidden">
								@endforeach
								@endif
								</td>
						</tr>
					</tbody></table></td>
			</tr>
	

				<tr>
				<th class="post_must">工作地点</th>
				<td>
					<table width="100%" cellspacing="0" cellpadding="0">
						<tbody><tr>
							<td style='width:300px;'><!-- <input type="hidden" name="locationId" id="locationId"
								value="" /> <input type="text" name="locationName"
								class="city" id="locationName" value="添加城市"
								readonly="readonly" onchange="chargeLocation(this.value);" />
								&nbsp;&nbsp; <input type="text" name="location" class="city"
								id="location" value="添加地理位置" readonly="readonly"
								style="display: none;"
								onclick="fnMarkMap(this.form.locationId.value, this.form.locationName.value, this.form.parentPosLat.value, this.form.parentPosLon.value)" /> -->
								<!-- <div class="imitationSel">
									<input type="button" id="button_SF_1_1_6F" class="imitationSelinput" value="请选择城市">
									<input type="hidden" value="" id="SF_1_1_6" name="SF_1_1_6">
									<input type="hidden" value="" id="SF_1_1_6_cq" name="SF_1_1_6_cq">
                                    <span class="arr"></span>
                       			 </div> -->
                       			 <div class="form-group">
							    <input  id='cw' name='cw' style='width:45%;' readonly="readonly" class="form-control input-sm" type="text" placeholder="请选择城市" value='{{ $rData -> cityN }}'>
							    <input id='citywork' name='citywork' type="hidden" value="{{ 'cityF_aItem_'.$rData -> r_id }}">
							</div>
							<div id="cityF_popupDiv" class="searchPopupDiv" style="width: 390px; z-index: 9030; left: 105px; top: 870px; visibility: hidden;">
								<table class="searchItemTab" style="border:2px solid #64B5E5" cellspacing="0" cellpadding="0" border="0">
									<tbody>
										<tr>
											<td colspan="3" class="title" id="cityF_mMove" style="padding-top:5px;background:#64B5E5;cursor:auto;"><div class="left">工作地点：</div><div class="right">[ <span onclick="" class="substitute4a" title="">关闭</span> ]</div>
											</td>
										</tr>
										<tr>
											<td colspan="3" class="content" style="border:0;">
											<div></div>
											<div id="cityF_dDiv" style="display: none;"></div>
											<div id="cityF_dDiv_h">
												<div class="hotcitysTitle">
													<span class="substitute4a" style="margin-right:18px" onclick=""><img src="/home/img/blank.gif" class="iconopen" id="cityF_hConIcon"></span>&nbsp;&nbsp;主要城市
												</div>
												<div id="cityF_hCon" class="hotcitysCon" style="display:;">
													<table class="hotcitysItemTab" cellspacing="0" cellpadding="0" border="0">
													<tbody>
														<tr>
														@foreach($mainData as $k => $v)
															<td width="20%">
																<span id="cityF_aItem_{{ $v -> id }}" onclick="" class="substitute4a itemSpan"><div class="cityItemPadding">{{ $v -> name }}</div></span>
															
															</td>
															@if(($k+1) % 5 == 0)
															</tr>
															<tr>
															@endif
														@endforeach
														</tr>
													</tbody>
													</table>
												</div>
											</div>
											<div id="cityF_dDiv_p"><div class="provincesTitle">
												<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><span onclick="" class="substitute4a"><img src="/home/img/blank.gif" class="iconopen" id="cityF_pConIcon"></span>&nbsp;&nbsp;</td><td id='procity'>省市</td></tr></tbody>
												</table></div>
												<div id="cityF_pCon" class="provincesCon" style="display:;">
												<table class="provincesItemTab" cellspacing="0" cellpadding="0" border="0"><tbody>
												<tr>
												@foreach($pidData as $k => $v)
													<td width="20%" >
													<span id="cityF_aItem_{{ $v -> id }}" onclick=""  class=" substitute4a itemSpan"><div pid='{{ $v -> id }}' class="cityItemPadding">{{ $v -> name }}</div></span>
													
														@if(count($idData[$k]))
														<table style="display:none; background: #fff;width:386px" class="provincesItemTab" cellspacing="0" cellpadding="0" border="0">
														<tbody>
														<tr>
														@foreach($idData[$k] as $ke => $va)
															<td width="20%">
															<span id="cityF_aItem_{{ $va -> id }}" onclick="" class=" substitute4a itemSpan"><div class="cityItemPadding">{{ $va -> name }}</div></span>
															</td>
															@if(($ke+1) % 5 == 0)
															</tr>
															<tr>
															@endif
														@endforeach
														
														</tr>
														</tbody>
														</table>
														@endif
													</td>
													@if(($k+1) % 5 == 0)
													</tr>
													<tr>
													@endif
												@endforeach
												</tr>
												</table>
												</div>
											</div>
									
											</td>
										</tr>
									</tbody>
								</table>
							</div>
							</td>
							<td class="margWidRight">
								<div class="companyPersin">
									<span>提示：</span>请您认真填写，工作地点发布后不可修改。
								</div></td>
						</tr>
					</tbody></table></td>
			</tr>
			<script>
			

			
			var cwy = document.getElementById("cw");
			cwy.onclick=clic;
			function clic()
			{
				var right = document.getElementsByClassName('right');
				var cityF=document.getElementById('cityF_popupDiv');
				cityF.style.visibility='visible';
				// 城市js
				var cip = document.getElementsByClassName('cityItemPadding');
				var city = document.getElementById("citywork");
				


				// var value=citywork.innerHTML;
				// console.log(city.value);
				// console.log(cip.length);
				var color = null;
				var scdj = city.value;
				// console.log(scdj);
				for(var item=0;item<cip.length;item++)
				{
					// console.log(cip[item].parentNode.id);
					if(scdj == '')
					{
						
					}else
					{
						if(scdj == cip[item].parentNode.id)
						{
							// console.log(530);
							cip[item].style.color='#ff6600';
						}
					}
					
					// cip[item].style.color='#3f419e';
					cip[item].onmouseover=function(){
						color=this.style.backgroundColor;
						this.style.background='#f09';
						// this.style.fontSize='18px';
					};
					cip[item].onmouseout=function(){
						
						this.style.background=color;
						// this.style.fontSize='18px';
					};
					
						if(cip[item].getAttribute('pid') && cip[item].parentNode.nextElementSibling)
						{
							
							// console.log(cityF_pConIcon);
							// console.log(cip[item].getAttribute('pid'));
							
							// console.log(cip[item].getAttribute('pid'));
							cip[item].onclick=function(){
								// this.onclick=CK;
								// var node = this.parentNode.parentNode.cloneNode(true);
								this.style.backgroundColor='#ffffff';
								var procity=document.getElementById('procity');
								var cityF_pCon=document.getElementById('cityF_pCon');
								var node = cityF_pCon.firstElementChild.cloneNode(true);
								
								// console.log(node);
								this.parentNode.nextElementSibling.style.display='block';
								cityF_pCon.replaceChild(this.parentNode.nextElementSibling,cityF_pCon.firstElementChild);
								// console.log(this.parentNode.nextElementSibling);
								procity.innerHTML = this.innerHTML+'[<span class="backtoProvinces substitute4a" id="back">返回其他省市</span>]';
								document.getElementById('back').onclick=function(e){
									cityF_pCon.replaceChild(node,cityF_pCon.firstElementChild);
									procity.innerHTML='省市';
									clic();
									e.stopPropagation();
								};
								// document.getElementById(scdj).style.color='#3f419e';
								// console.log(scdj);
								// var ci = document.getElementsByClassName('cityItemPadding');
								// for(var items=0;items<ci.length;items++)
								// {
								// 	ci[items].style.color='#3f419e';
								// 	// console.log(ci[items]);
								// }
								// cwy.value=this.innerHTML;
								// // this.style.background=color;
								// this.style.color='#ff6600';
								// // this.style.fontSize='18px';
								// // console.log(scdj);
								// scdj = this.parentNode.id;
								// city.value=this.parentNode.id;
								// cityF.style.visibility='hidden';
							};
						}else
						{
								cip[item].onclick=function(){
									// document.getElementById(scdj).style.color='#3f419e';
									// console.log(scdj);
									var ci = document.getElementsByClassName('cityItemPadding');
									for(var items=0;items<ci.length;items++)
									{
										ci[items].style.color='#3f419e';
										// console.log(ci[items]);
									}
									cwy.value=this.innerHTML;
									// this.style.background=color;
									this.style.color='#ff6600';
									// this.style.fontSize='18px';
									// console.log(scdj);
									scdj = this.parentNode.id;
									city.value=this.parentNode.id;
									cityF.style.visibility='hidden';
								};
						}
					
					
				}


				var hotcity = document.getElementsByClassName('hotcitysTitle');
				var cityF_hCon = document.getElementById('cityF_hCon');
				var cityF_hConIcon = document.getElementById('cityF_hConIcon');
				cityF_hCon.style.display='block';
				cityF_hConIcon.className='iconopen';
				hotcity[0].onclick=function(){
					if(cityF_hCon.style.display=='block')
					{
						cityF_hConIcon.className='iconclose';
						cityF_hCon.style.display='none';
					}else
					{
						cityF_hCon.style.display='block';
						cityF_hConIcon.className='iconopen';

					}
					
				}
				var prov = document.getElementsByClassName('provincesTitle');
				var cityF_pCon = document.getElementById('cityF_pCon');
				var cityF_pConIcon = document.getElementById('cityF_pConIcon');
				cityF_pCon.style.display='block';
				cityF_pConIcon.className='iconopen';
				cityF_pConIcon.onclick=function(){
					if(cityF_pCon.style.display=='block')
					{
						cityF_pConIcon.className='iconclose';
						cityF_pCon.style.display='none';
					}else
					{
						cityF_pCon.style.display='block';
						cityF_pConIcon.className='iconopen';

					}
					
				}
				right[0].onclick=function(){
					cityF.style.visibility='hidden';
				}
			}
			
			
				$('input[readonly]').css({
					'background-color':'#ffffff',
					'cursor':'pointer',
				});
			</script>
			<tr>
				<th>工作经验</th>
				<td><select name="MinYears" class="ip_se1">
						<option value="0">不限</option>
						@foreach($we as $k => $v)
						<option
						@if($rData -> w_id == $v -> id)
							selected='selected' 
						@endif
						 value="{{ $v -> id }}">{{ $v -> value }}</option>
						@endforeach
				</select>
					</td>
			</tr>
			<tr>
				<th>学历要求</th>
				<td><select name="education" class="ip_se1">
						<option value="0">不限</option>
						@foreach($er as $k => $v)
						<option
						@if($rData -> er_id == $v -> id)
							selected='selected' 
						@endif
						cc = {{ $rData -> er_id }} value="{{ $v -> id }}">{{ $v -> value }}</option>
						@endforeach
				</select> <span>含以上</span>
				</td>
			</tr>
			<tr>
				<th>工作性质</th>
				<td><label><input
				@if($rData -> jobcategory == 1)
checked="checked"
				@endif
				 type="radio"  value="1" name="employment_type">全职</label> <label><input
				@if($rData -> jobcategory == 2)
checked="checked"
				@endif
				  type="radio" value="2" name="employment_type">兼职</label> <label><input
				@if($rData -> jobcategory == 4)
checked="checked"
				@endif
				   type="radio" value="4" name="employment_type">实习</label>
				</td>
			</tr>
			<tr>
				<th style='height:30px;line-height:30px;'>招聘人数</th>
				<td><input style='width:15%;float:left;' class="form-control input-sm" id="jobnum" name="jobnum" value="{{ $rData -> num }}" size="5" maxlength="5" >
				</td>
			</tr>
			<tr>
				<th class="post_must">职位月薪</th>
				<td>
					<p>
						<select id="salary" name="salary" class="ip_se1">
							<option value="">请选择</option>
							@foreach($pms as $k  => $v)
							<option
							@if($rData -> pms_id == $v -> id)
								selected='selected' 
							@endif
						 	  value="{{ $v -> id }}">{{ $v -> value }}</option>
							@endforeach
							<!--<option value="0000000000">不显示职位月薪范围</option>-->
						</select><span></span>
					</p> <!--<p><a href="http://rd2.zhaopin.com/vacainfo/popwin.htm" target="_blank">请查阅国家相关法律法规对劳动报酬（职位 月薪）的新规定</a></p>-->
				</td>
			</tr>
			<!--
		<tr>
			<th class="post_must">发布日期</th>
			<td>
				<label><input type="radio" name="ptimeflag" value="now" checked="checked"/>立即发布</label><br/>
				<label><input type="radio" name="ptimeflag" value="schedule"/>定时发布</label>
				<input onfocus="this.className='ip_av4 fouse';WdatePicker({isShowClear:true,readOnly:true,skin:'whyGreen'});" onblur="this.className='ip_av4'"
					class="ip_av4" id="start" name="start" type="text" style="display: none; margin-left: -20px;" value="点击选择日期" readonly="readonly"/>
					<span class="thickkiy">您可以选择定时发布的时间</span>
			</td>
		</tr>
<script type="text/javascript">
			var Id = document.editCompanyInfo_form.ptimeflag;
		
			document.editCompanyInfo_form.ptimeflag[1].onclick = function() {
				document.getElementById("start").style.display = "";
			};
			document.editCompanyInfo_form.ptimeflag[0].onclick = function() {
				document.getElementById("start").style.display = "none";
			};
		</script>-->
			<tr>
				<th class="post_must">是否需要发票</th>
				<td><label><input type="radio" 
				@if($rData -> invoice_id == 0)
				checked="checked"
				@endif value="0" name="invoice">不需要</label> <label><input type="radio"
				@if($rData -> invoice_id <> 0)
				checked="checked" value="{{ $rData -> invoice_id }}"
				@else
				value="1"
				@endif  name="invoice">需要 (如果索取发票需要<span class="redcolor28">支付15元发票快递费用</span>，发票将快递至您提供的邮寄地址)</label></td>
			</tr>
		</tbody></table>

		@if($rData -> invoice_id == 0)
		<div style=" margin-bottom:10px;display: none; margin-left: 100px; width: 645px; height: 328px;" id="ul100" class="suoquhid">
			<ul>
				<li>发票抬头：<label><input type="radio" checked="checked" value="单位" name="itype">单位&nbsp;</label> <label><input type="radio" value="个人" name="itype">个人</label>
				</li>
				<li>单位名称：<label><input type="text" class="iv_inp3" value="{{ session('master['.$id.']') -> compname }}" name="icorpname">&nbsp;</label>
				</li>
				<li>发票内容：<label><input type="radio" checked="" value="咨询费" name="idesc">咨询费&nbsp;</label> <label><input type="radio" value="咨询服务费" name="idesc">咨询服务费&nbsp;</label> <label><input type="radio" value="服务费" name="idesc">服务费</label>
				</li>
				<li style="text-indent: 0.5em">收件人：<label><input type="text" class="iv_inp1" value="{{ session('master['.$id.']') -> contactor }}" name="rname"> </label><span class="ipin_recolor">请提供收件人全名</span>
				</li>
				<li>手机号码：<label><input type="text" class="iv_inp1" value="{{ session('master['.$id.']') -> phone }}" name="rphone"> </label><span class="ipin_recolor">请提供收件人手机号码</span>
				</li>
				<li>邮寄地址：
				<span id="padds2" style="width: 220px !important; padding: 0px !important;"> 
					<select id="padd2" name="padd2" class="ip_se2">
						<option value="">请选择</option>
						@foreach($mainData as $ke => $va)
						<option 
						@if(session('master['.$id.']') -> province == $va -> id)
							selected = 'true'
						@endif
						value="{{ $va -> id }}">{{ $va -> name }}</option>
						@endforeach
						@foreach($pidData as $k => $v)
						<option
						@if(session('master['.$id.']') -> province == $v -> id)
							selected = 'true'
						@endif
						value="{{ $v -> id }}">{{ $v -> name }}</option>
						@endforeach
					</select>&nbsp;<span>省/直辖市</span>&nbsp;
				</span>
				<span id="padds3" 
				@if(session('master['.$id.']') -> province == session('master['.$id.']') -> city)
				style="width: 210px ! important; padding: 0px ! important; display: none;"> 
				@else
				style="width: 210px ! important; padding: 0px ! important; display: ;"> 
				@endif
					<select id="padd3" name="padd3" class="ip_se3">
							<option value="">请选择</option>
							@foreach($idData as $key => $value)
							@foreach($value as $a => $re)
							<option
							@if(session('master['.$id.']') -> city == $re -> id)
								selected = 'true' style = 'display:block'
							@else
								style='display:none'
							@endif
							class='{{ $re -> pid }}' value="{{ $re -> id }}">{{ $re -> name }}</option>
							@endforeach
							@endforeach
					</select><span>市</span> 
				</span><br>  <input type="text" onblur="if(this.value=='详细地址'||this.value==''){this.value='详细地址'; } this.className='ip_av6'" onfocus="if(this.value=='详细地址'){this.value='';} this.className='ip_av6 fouse'" value="详细地址" name="raddress" class="ip_av6">
				</li>
				<li style="text-indent: 1.0em">邮编：<label><input type="text" class="iv_inp1" value="" name="rpostcode"> </label>
				</li>
			</ul>
		</div>	
		@elseif($rData -> invoice_id <> 0)
			<div style=" margin-bottom:10px;display: block; margin-left: 100px; width: 645px; height: 328px;" id="ul100" class="suoquhid">
			<ul>
				<li>发票抬头：<label><input type="radio"
				@if($rData -> invoiceheader == '单位')
				 checked="checked"
				@endif value="单位" name="itype">单位&nbsp;</label> <label><input type="radio"
				@if($rData -> invoiceheader == '个人')
				 checked="checked"
				@endif value="个人" name="itype">个人</label>
				</li>
				<li>单位名称：<label><input type="text" class="iv_inp3" value="{{ $rData -> compname }}" name="icorpname">&nbsp;</label>
				</li>
				<li>发票内容：<label><input type="radio" 
				@if($rData -> idesc == '咨询费')
				 checked="checked"
				@endif value="咨询费" name="idesc">咨询费&nbsp;</label> <label><input
				@if($rData -> idesc == '咨询服务费')
				 checked="checked"
				@endif  type="radio" value="咨询服务费" name="idesc">咨询服务费&nbsp;</label> <label><input
				@if($rData -> idesc == '服务费')
				 checked="checked"
				@endif type="radio" value="服务费" name="idesc">服务费</label>
				</li>
				<li style="text-indent: 0.5em">收件人：<label><input type="text" class="iv_inp1" value="{{ session('master['.$id.']') -> contactor }}" name="rname"> </label><span class="ipin_recolor">请提供收件人全名</span>
				</li>
				<li>手机号码：<label><input type="text" class="iv_inp1" value="{{ $rData -> rphone }}" name="rphone"> </label><span class="ipin_recolor">请提供收件人手机号码</span>
				</li>
				<li>邮寄地址：
				<span id="padds2" style="width: 220px !important; padding: 0px !important;"> 
					<select id="padd2" name="padd2" class="ip_se2">
						<option value="">请选择</option>
						
						@foreach($pidData as $k => $v)
						<option
						@if($regData[0] -> id == $v -> id)
							selected = 'true'
						@endif
						value="{{ $v -> id }}">{{ $v -> name }}</option>
						@endforeach
						@foreach($mainData as $ke => $va)
						<option 
						@if($regData[0] -> id == $va -> id)
							selected = 'true'
						@endif
						value="{{ $va -> id }}">{{ $va -> name }}</option>
						@endforeach
					</select>&nbsp;<span>省/直辖市</span>&nbsp;
				</span>
				<span id="padds3" 
				@if(session('master['.$id.']') -> province == session('master['.$id.']') -> city)
				style="width: 210px ! important; padding: 0px ! important; display: none;"> 
				@else
				style="width: 210px ! important; padding: 0px ! important; display: ;"> 
				@endif
					<select id="padd3" name="padd3" class="ip_se3">
							<option value="">请选择</option>
							@foreach($idData as $key => $value)
							@foreach($value as $a => $re)
							<option
							@if($rData -> city_id == $re -> id)
								selected = 'true' style = 'display:block'
							@else
								style='display:none'
							@endif
							class='{{ $re -> pid }}' value="{{ $re -> id }}">{{ $re -> name }}</option>
							@endforeach
							@endforeach
					</select><span>市</span> 
				</span><br>  <input type="text" onblur="if(this.value=='详细地址'||this.value==''){this.value='详细地址'; } this.className='ip_av6'" onfocus="if(this.value=='详细地址'){this.value='';} this.className='ip_av6 fouse'" value="{{ empty($rData -> raddress)?详细地址:$rData -> raddress }}" name="raddress" class="ip_av6">
				</li>
				<li style="text-indent: 1.0em">邮编：<label><input type="text" class="iv_inp1" value="{{ $rData -> rpostcode }}" name="rpostcode"> </label>
				</li>
			</ul>
		</div>
		@endif  
		
		@if($rData -> invoice_id == 0)
			<script>
			var height = 0;
			function cha()
			{
				
				// console.log($(this).attr('checked'));
				if($(this).attr('checked'))
				{
					// console.log($(this).val());
					$('#ul100').fadeOut();
					height = parseInt($('#ul100').css('height'))+20;
					// console.log(height);
					// console.log($('#moban').offset().top);
					$('#moban').css('top',1191+'px');
				}else
				{
					
					// console.log($(this).val());
					$('#ul100').fadeIn();
					$('#moban').css('top',1540 +'px');
					height = 0;
				}
			}
			</script>
		@endif
		@if($rData -> invoice_id <> 0)
			<script>
			var height = 0;
			function cha()
			{
				
				// console.log($(this).attr('checked'));
				if(!$(this).attr('checked'))
				{
					// console.log($(this).val());
					$('#ul100').fadeOut();
					height = parseInt($('#ul100').css('height'))+20;
					// console.log(height);
					// console.log($('#moban').offset().top);
					$('#moban').css('top',1191+'px');
				}else
				{
					
					// console.log($(this).val());
					$('#ul100').fadeIn();
					$('#moban').css('top',1540 +'px');
					height = 0;
				}
			}
			</script>
		@endif
		<script>
			
			// 是否需要发票
			// console.log($('input[name=invoice]'));
			$('input[name=invoice]').each(function(i,v){
				$(v).change(cha);
				// console.log($(v).val());
			})
			// $('input[name=invoice]').eq(1).change(cha);
			

			
		
			document.getElementById('padd2').onchange=function()
			{
				var pcla = this.options[this.selectedIndex].value;
				var pitem = document.getElementsByClassName(pcla);
				var padds3 = document.getElementById('padds3');
				if(pitem.length)
				{
					padds3.style.display='';
					pn=0;
					for(var pi=0;pi<document.getElementById('padd3').options.length;pi++)
					{
						if(pcla == document.getElementById('padd3').options[pi].getAttribute('class'))
						{
							
							pn++;
							document.getElementById('padd3').options[pi].style.display='';
							if(pn==1)
							{
								document.getElementById('padd3').options[pi].setAttribute('selected','selected');
							}
							
						}else
						{
							document.getElementById('padd3').options[pi].style.display='none';
						}
					}
				}else
				{
					padds3.style.display='none';

				}
				
				// console.log(item);
				// var idData;
				// console.log(idData);
			}
			</script>

		<table style="" width="100%" cellspacing="0" cellpadding="0">
			<tbody style="">
			
			
			
			
			
			
			
			

			
			<tr>
				<th class="post_must" valign="top">接收简历邮箱</th>
				<td>
					{{ session('master['.$id.']') -> email }}
				</td>
			</tr>
			
			
			
			
			
			<script>
			document.getElementById('add2').onchange=function()
			{
				var cla = this.options[this.selectedIndex].value;
				var item = document.getElementsByClassName(cla);
				var adds3 = document.getElementById('adds3');
				if(item.length)
				{
					adds3.style.display='';
					n=0;
					for(var i=0;i&lt;document.getElementById('add3').options.length;i++)
					{
						if(cla == document.getElementById('add3').options[i].getAttribute('class'))
						{
							
							n++;
							document.getElementById('add3').options[i].style.display='';
							if(n==1)
							{
								document.getElementById('add3').options[i].setAttribute('selected','selected');
							}
							
						}else
						{
							document.getElementById('add3').options[i].style.display='none';
						}
					}
				}else
				{
					adds3.style.display='none';

				}
				
				// console.log(item);
				// var idData;
				// console.log(idData);
			}
			</script>
			<tr style="">
				<th class="post_must" valign="top">联系方式 <div id="moban"
				@if($rData -> invoice_id == 0)
				style="position: absolute; left: 513px; top: 1191px; z-index: 1400; background: rgb(204, 204, 204) none repeat scroll 0% 0%; width: 90px; height: 25px;"
				@endif
				@if($rData -> invoice_id <> 0)
				style="position: absolute; left: 513px; top: 1540px; z-index: 1400; background: rgb(204, 204, 204) none repeat scroll 0% 0%; width: 90px; height: 25px;"
				@endif
				>从公司模板导入</div></th>
				<td class="o3class" style="">
					<div style="position: absolute;left:150px ;top: 1650px ; padding:10px;background: #ccf; width: 393px; visibility: hidden; z-index: 1099;" onclick="event.cancelBubble=true;" id="popupDiv_contactFromComp" class="popupDivCon">
						<div class="popupDivCon_Title">联系方式</div>
						<div class="popupDivCon_Content">
							<div style="margin-bottom: 5px;">
								<input checked="checked" onfocus="this.blur()" value="" id="comp_contact0" type="checkbox"> <span id="text_comp_contact0">公司名称：</span> <input size="35" value="智联招聘" name="textInput_comp_contact0" type="text">
							</div>
							<div style="margin-bottom: 5px;">
								<input checked="checked" onfocus="this.blur()" value="" id="comp_contact1" type="checkbox"> <span id="text_comp_contact1">公司地址：</span> <input size="35" style="background: #ffffff" value="" name="textInput_comp_contact1" type="text">
							</div>
							<div style="margin-bottom: 5px;">
								<input onfocus="this.blur()" value="" id="comp_contact2" type="checkbox"> <span id="text_comp_contact2">联系电话：</span> <input size="35" value="--" style="background: #ffffff" name="textInput_comp_contact2" type="text">
							</div>
							<div style="margin-bottom: 5px;">
								<input checked="checked" onfocus="this.blur()" value="" id="comp_contact5" type="checkbox"> <span id="text_comp_contact5">公司主页：</span> <input style="background: #ffffff" size="35" value="" name="textInput_comp_contact5" type="text">
							</div>
						</div>
						<div class="footer">
							<a class="confirm" href="javascript:void(0)">确定</a>
							<a class="cancle" href="javascript:void(0)">取消</a>
						</div>
					</div>
					<table style="">
						<tbody style=""><tr style="">
							<td style="">
								<div id="anchorFromComp3">
									最多1000个字符<a></a>&nbsp;<font class="errorStr"></font>
								</div> <div class="form-group" style="width: 500px;">
                                    <!-- 加载编辑器的容器 -->
                                   
                                   <script id="lxfs" style='width:100%;height:200px;' name="lxfs" type="text/plain">{!! session('master['.$id.']') -> lxfs !!}</script>

                                    <!-- 实例化编辑器 -->
                                    <script type="text/javascript">
                                        var lxfs = UE.getEditor('lxfs',{
                                        	maximumWords:2000,
                                        	toolbars: [
											    ['fullscreen', 'source', 'undo', 'redo'],
											    ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc','preview']
											],
    										autoHeightEnabled: false
											
                                        });

                                    </script>
                                   
                                </div>
							</td>
							<td class="tieshi" valign="top">
								<div style="margin-top: 7px" class="companyPersin">
									<span>提示：</span>此处联系方式会展示在您的职位广告下方，让求职者会看到。请您准确填写。<br>
									联系方式包括：<br> 1 公司名称；<br> 2 公司地址；<br> 3 联系电话等。
								</div></td>
						</tr>
					</tbody></table></td>
			</tr>
			<!-- yingxu.fu start -->
				
				
		</tbody></table>
		<script>
			function turncha()
			{
				// console.log($(this).attr('checked'));
				if(!$(this).attr('checked'))
				{
					// console.log($(this).val());
					// $(this).attr('checked','checked');
					$('#onlineUpload').fadeOut();
				}else
				{
					// console.log($(this).val());
					$('#onlineUpload').fadeIn();
					// $(this).attr('checked','');

				}
			}
			// 是否需要发票
			// console.log($('input[name=invoice]'));
			$('input[name=busiLicense]').each(function(i,v){
				// $(v[i]).click();
				$(v).change(turncha);
				// console.log($(v).val());
			})
			// $('input[name=invoice]').eq(1).change(cha);


			// start
				function mobanc()
				{

					// alert($(this).val());
					$(this).unbind('click');
					var thi = $(this);
					var div = $('<div></div>');
					var divT = $(this).offset().top;
					var divL = $(this).offset().left + $(this).width();
					var id = null;
					var idh = null;
					var content = null;
					// div背景
					div.css({
						width:$(window).width()+'px',
						height:$(document).height()+'px',
						background:'rgba(179,179,179,0.4)',
						position:'absolute',
						top:0,
						left:0,
						display:'block',
						zIndex:'1000'
					});
					div.attr('id','zzc');
					
					// console.log(div);
					// div.append(div1);
					$('body').append(div);
					$('#popupDiv_contactFromComp').css({
						visibility:'visible',
					});
					function clse()
					{
						$(div).css({
							visibility:'hidden',
						});
						$('#popupDiv_contactFromComp').css({
							visibility:'hidden',
						});
						thi.click(mobanc);
					}
					$('#popupDiv_contactFromComp').find('.cancle').click(clse);
					$('#popupDiv_contactFromComp').find('.confirm').click(function(){
						// var span = $('#popupDiv_contactFromComp').find('input,span');
						var str = '';
						$('#popupDiv_contactFromComp').find('input,span').each(function(i,v){
							
							if(i%3==2 && this.value)
							{
								// console.log(this.value);
								if(this.value.lastIndexOf('--')>=0)
								{
									str = str + this.value.substr(this.value.lastIndexOf('--')+2)+'<br>';
									
								}else
								{
									str +=this.value + '<br>';
								}
								
							}else if(i%3==1)
							{
								str += $(v).html();
							}
							
						});
						// console.log(str);
						lxfs.setContent(str, true);
						clse();
					});
					
				
				}
				$('#moban').click(mobanc);
		</script>
		<script>
				$('input[readonly]').css({
					'background-color':'#ffffff',
					'cursor':'pointer',
				});
			</script>
		<table width="100%" cellspacing="0" cellpadding="0">
			<!-- yingxu.fu end -->
			<tbody>
			<tr>
						<td class="margWidRight" style="text-align: right; padding-right: 20px;"><a href="{{ url('/home/enterprise/modify') }}/{{ $id }}?token={{ session('master['.$id.']') -> token }}" target="_blank">修改公司信息&gt;&gt;</a></td>
					</tr><tr>
				<td align="center" colspan="2">
					<input type="submit" class="ip_prebt" value='' >
				</td>
			</tr>
		</tbody></table>
		<!--信息填写 结束-->
		<!--职位描述过于简单时 弹出框-->
		<div style="display: none;" class="inforless">
			<iframe class="menu_iframe"></iframe>
			<div class="infor_closed">
				<input type="button" onclick="jQuery('.inforless').css('display','none');" class="close_" name="closed">
			</div>
			<h4>您的职位描述过于简单(少于50个字)</h4>
			<p>详尽的职位描述能够帮助求职者更好的了解职位的工作内容和要求，帮助您吸引更多目标求职者的关注，提升您的招聘效果。忽略请直接点击下一步！</p>
			<div class="infor_retu">
				<input type="button" onclick="javascript:jQuery('.inforless').css('display','none');" class="col1">
				<input type="button" onclick="javascript:submitForm('',1);" class="col2"> <input type="hidden" value="sv" id="btntype" name="ot">
			</div>
		</div>
	</form>
</div>
<input form="editCompanyInfo_forms" name="c_id[]" value="{{ $rData -> c_id }}" type="hidden">
<input form="editCompanyInfo_forms" name="c_id[]" value="{{ $rData -> p_id }}" type="hidden">
@endsection